<!DOCTYPE html>
<html  class="ui-page-login">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../css/mui.min.css" rel="stylesheet" />
	    <link href="css/style.css" rel="stylesheet" />
	    <style type="text/css">
	    	.my-icon{
	    		color:#5ccbd6;
	    		margin-right: 10px;
	    	}
	    </style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">设置</h1>
		</header>
		<div class="mui-content">
			<ul class="mui-table-view">
			    <li class="mui-table-view-cell" style="padding: 20px 20px 20px 30px;">
			        <a class="mui-navigate-right">
			        	 <img id="avator_img" class="mui-media-object mui-pull-left" style="border-radius: 50%;" src="images/iconfont-tianjia.png">
			            <div class="mui-media-body">
			                <span id="userName">幸福</span>
			                <p class='mui-ellipsis' id="userTel">18522151</p>
			            </div>
			        </a>
			    </li>
			    <li class="mui-table-view-cell">
			        <a class="mui-navigate-right">
			       		<span class="mui-icon mui-icon mui-icon-contact my-icon"></span>
			       		账户设置
			        </a>
			    </li>
			    <li class="mui-table-view-cell">
			        <a class="mui-navigate-right">
			        	<span class="mui-icon mui-icon mui-icon-contact my-icon"></span>
			       		商户认证
			        </a>
			    </li>
			    <li class="mui-table-view-cell">
			        <a class="mui-navigate-right">
			        	<span class="mui-icon mui-icon mui-icon-contact my-icon"></span>
			       		商户认证
			        </a>
			    </li>
			    <li class="mui-table-view-cell" id="closeApp">
			        <a class="mui-navigate-right">
			        	<span class="mui-icon mui-icon mui-icon-contact my-icon"></span>
			       		退出登录
			        </a>
			    </li>
			</ul>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="js/mui.enterfocus.js"></script>
		<script src="js/public.js"></script>
		<script src="js/app.js"></script>
		<script src="js/jquery-2.1.0.js"></script>
		<script>jQuery.noConflict()</script>
	</body>
</html>
<script type="text/javascript">
	mui.init({
		beforeback: function(){
			//获得列表界面的webview
			var list = plus.webview.getWebviewById('main');
			//触发列表界面的自定义事件（refresh）,从而进行数据刷新
			mui.fire(list,'refreshHtml');
			//返回true，继续页面关闭逻辑
			return true;
		}
	});
	mui.plusReady(function(){
		var state = app.getState();
		jQuery("#userName").html(state.account);
		jQuery("#userTel").html(state.tel);
		//jQuery('#avator_img').attr('src', state.avator_img);
		document.getElementById('closeApp').addEventListener('tap',function(e) {
			plus.nativeUI.actionSheet({
                cancel: "取消",
                buttons: [{
                    title: "注销当前账号"
                }, {
                    title: "直接关闭应用"
                }]
            }, function(e) {
                var index = e.index;
                switch (index) { //case 0: 取消
                    case 1: //
                        localStorage.clear();
                        plus.runtime.restart();
                        break;
                    case 2: //
                        plus.runtime.quit();
                        break;
                }
            });
		})
	})
</script>